﻿using System.Web;
using System.Web.Mvc;
using JSM.DataStore;
using JSM.MVC3.DataStore;

namespace JSM.MVC3
{
	internal class JSMHttpModule : IHttpModule
	{
		/// <summary>
		/// Initialization method for the <see cref="IHttpModule"/>.
		/// </summary>
		/// <param name="httpApplication">
		/// An instance of the <see cref="HttpApplication"/>.
		/// </param>
		public void Init(HttpApplication httpApplication)
		{
			DefaultDataStoreFactory.RegisterDefaultDataStore(typeof(ControllerBase), ViewDataDataStoreProvider.GetDataStoreProvider);
		}

		/// <summary>
		/// Dispose method.
		/// </summary>
		public void Dispose()
		{
		}
	}
}